/* Copyright (c) 2016-2020 Enfry Ltd. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of Enfry. 
 * You shall not disclose such Confidential Information
 * and shall use it only in accordance with the terms of the agreements
 * you entered into with Enfry.
 */
package com.enfry.storage.api;

import org.springframework.dao.DataAccessException;

import com.enfry.storage.entity.Client;
import com.enfry.storage.exception.ExCode;
import com.enfry.storage.exception.StorageException;

public class ClientImpl extends BaseApi implements IClient {

	@Override
    public Client getByAppKey(String appKey) {
        try {
            Client client = sqlMap.queryForObject("storage.client.selectByAppKey", appKey);
            return client;
        } catch (DataAccessException e) {
            throw new StorageException(ExCode.DB_ERR, e);
        }
    }

}
